package reflect

import (
	"fmt"
	"reflect"
)

func Print() {
	var apple Apple = Apple{
		Fruit: Fruit{
			Name:  "apple",
			Id:    0,
			Color: "red",
		},
		Fresh: true,
	}
	reflect.ValueOf(apple).MethodByName("Print").Call([]reflect.Value{})
	fmt.Println("")
	reflect.ValueOf(&apple).MethodByName("ClearName").Call([]reflect.Value{})
	fmt.Println("")
	reflect.ValueOf(&apple).MethodByName("Print").Call([]reflect.Value{})
	fmt.Println("")
	reflect.ValueOf(&apple).MethodByName("SetName").Call([]reflect.Value{reflect.ValueOf("wwy")})
	fmt.Println("")
	reflect.ValueOf(&apple).MethodByName("Print").Call([]reflect.Value{})

}
